/**
 * Licensed by the Bunie Developmentgroup.
 */
package Protocol;

import java.io.Serializable;

/**
 * @author Wouter
 * Super class of all Packets
 */
public abstract class BasicPacket implements Serializable, BasicPacketInterface{
    int version, type;
    
    /**
     * Constructor of the basicpacket
     * @param version Version of the basicpacket
     */
    public BasicPacket(int version) {
        this.version = version;
        this.type = PacketTypeKeeper.BASICPACKET;
    }
    
    /**
     * Mehode to get the version of the basicpacket
     * @return Version of the basicpacket
     */
    @Override
    public int getVersion() {
        return this.version;
    }
    
    @Override
    public String toString() {
        return "Version "+version  +" "+
               "Type "   +type + "  ";// PacketTypeKeeper.translate(type)     +" ";
    }
}
